# coding:utf-8
# writingtime: 2022-8-11

import random as rm
import numpy as np
import matplotlib.pyplot as plt


x = np.random.random(10)

y = np.random.random(10)

note = np.arange(1, 11)

plt.scatter(x, y, marker='o', c='r')
plt.title('在数据上添加标注', fontproperties='Microsoft YaHei')
for i in range(10):
    plt.annotate(note[i], xy=(x[i], y[i]), xytext=(x[i] + 0.01, y[i] + 0.01))

plt.show()





